package com.gather.service.impl;

import com.common.dto.LoginAccount;
import com.common.dto.SnatchItem;
import com.common.dto.WebNode;
import com.common.system.SystemData;
import com.gather.service.LoggerService;

public class LoggerServiceImpl implements LoggerService {

	@Override
	public void addAccountLog(String webCode,String userName,String message) {
		LoginAccount loginAccount = SystemData.findLoginAccount(webCode, userName);
		if(null != loginAccount){
			loginAccount.setDescribe(message);
		}
	}

	@Override
	public void addNodeLoginLog(String webCode, String message) {
		// TODO Auto-generated method stub
		WebNode webNode = SystemData.findWebNode(webCode);
		if(null != webNode){
			webNode.setLoginRemarks(message);
		}
	}

	@Override
	public void addNodeThirdLog(String webCode, String message) {
		// TODO Auto-generated method stub
		WebNode webNode = SystemData.findWebNode(webCode);
		if(null != webNode){
			webNode.setThirdRemarks(message);
		}
	}

	@Override
	public void addItemLog(String webCode, String itemOnlyCode, String message) {
		// TODO Auto-generated method stub
		SnatchItem snatchItem = SystemData.findSnatchItem(webCode,itemOnlyCode);
		if(null != snatchItem){
			snatchItem.setDescribe(message);
		}
	}

}
